import Layout from '@/views/Layout.vue'
import Article from '@/views/Article.vue'
import User from '@/views/User.vue'
import Like from '@/views/Like.vue'
import Collect from '@/views/Collect.vue'
// import Detail from '@/views/Detail.vue'

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({
    routes:[
      {path:'/',component:Layout,redirect:'/article',
        children:[
          {path:'/article',component:Article},
          {path:'/user',component:User},
          {path:'/like',component:Like},
          {path:'/collect',component:Collect},
          // {path:'/detail/:id',component:Detail}
        ]
      },
      {path:'*',redirect:'/'}
    ]
})

export default router